package com.learn.util.log;

import java.util.Map;

/**
 * 功能：日志事件
 *
 * @author wsh
 * @date 2021/1/25
 */
public final class LoggingEvent {
    /**
     * 日志操作人标识
     */
    private Long operatorId;
    /**
     * 日志操作人名称
     */
    private String operatorName;
    /**
     * 产生日志的类名
     */
    private String className;
    /**
     * 产生日志的方法
     */
    private String method;
    /**
     * 日志级别：trace、debug、info、warn、error
     */
    private String level;
    /**
     * 格式化后的日志内容
     */
    private String content;
    /**
     * 日志类型，由业务系统自行定义
     */
    private int type;
    /**
     * 日志产生时间
     */
    private long time;
    /**
     * 日志扩展数据，业务系统使用，日志组件只负责传递数据
     */
    private Map<String, Object> extData;

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    /**
     * @return 返回{@linkplain #extData}
     */
    public Map<String, Object> getExtData() {
        return extData;
    }

    /**
     * @param extData 要设置的 extData
     */
    public void setExtData(Map<String, Object> extData) {
        this.extData = extData;
    }

}
